package redislock

import "time"

type LockOption func(*lock)

func CloseAutoExtend() LockOption {
	return func(l *lock) {
		l.autoExtend = false
	}
}

func WithTTL(ttl time.Duration) LockOption {
	return func(l *lock) {
		if ttl < time.Second {
			ttl = time.Second
		}
		l.ttl = ttl
	}
}
